package user;


import book.BookList;
import operation.IOperation;

public abstract class User {
    protected String name; //用户名
    protected IOperation[] iOperations; //此时并没有进行初始化和分配大小
    public User(String name) {
        this.name = name;
    }
    public abstract int menu();

    public void doOperation(int choice, BookList bookList) {
        if(choice >= 0 && choice <  iOperations.length ){
            this.iOperations[choice].work(bookList);
        } else {
            System.out.println("非法输入!请再次输入!");
        }
    }
}
